<style>
    .close_container {
        width: 100%;
        height: 100%;
        position: fixed;
        background-color: rgba(0, 0, 0, 0.7);
        left: 0;
        top: 0;
        z-index: 99;
        display: none;
    }

    .close_wrap {
        width: 85%;
        position: absolute;
        left: 50%;
        top: 50%;
        background-color: #ffffff;
        border-radius: 5px;
        transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
        -moz-transform: translate(-50%, -50%);
        -o-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
    }

    .close_wrap_pic {
        width: 85%;
        position: absolute;
        left: 50%;
        top: 50%;
        /*background-color:#ffffff;*/
        border-radius: 5px;
        transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
        -moz-transform: translate(-50%, -50%);
        -o-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);

    }

    .close_wrap_pic {
        width: 6rem;
        display: block;
        height: auto;
    }

    .close_title {
        width: 100%;
        text-align: center;
        background: linear-gradient(rgb(218, 73, 97), rgb(126, 3, 3));
        background: -webkit-linear-gradient(rgb(218, 73, 97), rgb(126, 3, 3));
        color: #ffffff;
        font-size: 0.36rem;
        font-weight: bold;
        line-height: 2.5;
    }

    .close_B {
        width: 35px;
        height: 35px;
        margin-left: -17.5px;
        position: absolute;
        left: 50%;
        background: url('__PUBLIC__/images/public/close_.png') no-repeat;
        background-size: 100% 100%;
        bottom: -60px;
    }

    /*  */
    .sharePopup_container {
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, .7);
        position: fixed;
        z-index: 99;
        left: 0;
        top: 0;
        display: none;
    }

    .sharePopup_wrap {
        width: 5.6rem;
        position: relative;
        height: 7.92rem;
        left: 50%;
        top: 50%;
        background: url('__PUBLIC__/images/shareHD/img_beijing2.png') no-repeat;
        background-size: 100% 100%;
        transform: translate(-50%, -50%);
        border-radius: 0.25rem;
    }

    .close_sharePopup {
        width: 0.56rem;
        height: 0.56rem;
        position: absolute;
        background: url('__PUBLIC__/images/shareHD/btn_close.png') no-repeat;
        background-size: 100% 100%;
        right: 0;
        top: 0;
        z-index: 2;
    }

    .sharePopup_top {
        text-align: center;
        position: absolute;
        top: 1.1rem;
        width: 100%;
    }

    .sharePopup_top p {
        font-size: 0.34rem;
        color: #333333;
    }

    .sharePopup_top h3 {
        font-size: 1.06rem;
        color: #000000;
        font-weight: 400;
    }

    .sharePopup_top h3 span {
        font-size: 0.46rem;
        color: #000000;
        font-weight: 400;
    }

    .sharePopup_bottom {
        position: absolute;
        text-align: center;
        width: 100%;
        font-size: 0.24rem;
        color: #36a2cc;
        top: 3.5rem;
    }

    .placeBtn {
        width: 4.38rem;
        height: 1rem;
        background: url('__PUBLIC__/images/shareHD/img_btn.png') no-repeat;
        background-size: 100% 100%;
        position: absolute;
        left: 50%;
        top: 5.6rem;
        margin-left: -2.19rem;
        animation: Pscalc .7s infinite ease-in-out;
    }

    @keyframes Pscalc {
        0% {
            transform: scale(1)
        }

        50% {
            transform: scale(1.05)
        }

        100% {
            transform: scale(1)
        }
    }

    /* 提示分享 */
    .ts_tc_container {
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 99;
        display: none;
    }

    .ts_tc_bg {
        width: 100%;
        height: 300px;
        background: url('__PUBLIC__/images/public/mg_share.png') no-repeat;
        background-size: 100% 100%;
    }

    .ts_tc_contnet {
        font-size: 18px;
        color: #ffffff;
        padding: 180px 130px 30px 90px;
        text-align: center;
    }
</style>

<style>
    .close_content {
        padding: 0.4rem;
        text-align: center;
    }

    .close_top {
        display: flex;
        align-items: center;
        flex: -webkit-box;
        -webkit-box-pack: center;
    }

    .top_head img {
        width: 1rem;
        height: 1rem;
        vertical-align: middle;
        border-radius: 50%;
    }

    .top_content {
        flex: 1;
        -webkit-box-flex: 1;
        padding: 0.2rem;
        background-color: #9EEA6A;
        margin-left: 0.2rem;
        border-radius: 0.1rem;
        font-size: 0.28rem;
        color: #333333;
        position: relative;
    }

    .top_content:before {
        content: '';
        display: inline-block;
        border: 0.2rem solid transparent;
        border-right-color: #9EEA6A;
        position: absolute;
        left: -0.35rem;
        top: 50%;
        margin-top: -0.2rem;
    }

    .close_search {
        display: flex;
        display: -webkit-box;
        margin: 0.4rem 0;
    }

    .search_value {
        flex: 1;
        -webkit-box-flex: 1;
        border: 0.02rem solid #bb1b21;
        border-radius: 0.1rem 0 0 0.1rem;
        font-size: 0.3rem;
        color: #bb1b21;
        font-weight: bold;
        line-height: 0.8rem;
        text-align: center;
    }

    .search_btn {
        text-align: center;
        color: white;
        font-size: 0.3rem;
        line-height: 0.8rem;
        background-color: #bb1b21;
        width: 1rem;
    }

    .open_wx {
        height: 0.8rem;
        line-height: 0.8rem;
        background-color: #3A9E13;
        border-radius: 0.1rem;
        color: #ffffff;
        font-size: 0.32rem;
        text-align: center;
        box-shadow: 0 0 0.05rem #e0e0e0;
    }

    .open_wx::before {
        content: '';
        width: 0.46rem;
        height: 0.37rem;
        display: inline-block;
        background: url('__PUBLIC__/images/public/weixin_icon.png') 0% 0% / 100% 100% no-repeat;
        vertical-align: middle;
        margin-right: 0.15rem;
    }

    .add_point {
        font-size: 0.24rem;
        color: dimgrey;
        text-align: center;
        font-style: italic;
        margin: 0.3rem 0 0.1rem;
    }

    .add_point strong {
        color: #3cbe0b;
    }

    .fixed-top {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999999;
        display: none;
    }

    .fixed-top-tip {
        color: #ffffff;
        font-size: 0.28rem;
        background-color: rgba(0, 0, 0, 0.7);
        padding: 0.1rem 0.4rem;
    }
    .close-wrap.for-bbqm{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }
    .for-bbqm .up-wrap{
        width: 6.4rem;
        height: 3.05rem;
        background: url('__PUBLIC__/images/bbqm_img/v4/img_bj.png') no-repeat center center;
        background-size:  100% 100%;
        position: relative;
        padding: .26rem .5rem .2rem;
        box-sizing: border-box;
    }
    .for-bbqm .bt-img{
        width: 6.4rem;
        display: block;
        height: auto;
    }
    .up-wrap .close_BB{
        position: absolute;
        width: 0.48rem;
        height: 0.48rem;
        top: 0.1rem;
        right: 0.1rem;
    }
    .up-wrap .dashi-wrap{
        display: flex;
    }
    .up-wrap .dashi-wrap img.avatar{
        display: block;
        width: 1.04rem;
        height: 1.04rem;
        border-radius: 50%;
        margin-right: 0.15rem;
    }
    .up-wrap .dashi-wrap .wx-wraps .minge{
        font-size: .32rem;
        color: #ffea3c;
        margin-bottom: 0.1rem;
    }
    .up-wrap .dashi-wrap .wx-wraps .wxcode{
        font-size: .24rem;
        color: #ffffff;
    }
    .up-wrap .mock-inputer{
        display: flex;
        justify-content: center;
        margin: .2rem 0;
    }
    .up-wrap .mock-inputer .white{
        width: 4rem;
        flex:none;
        height: .78rem;
        line-height: .78rem;
        background-color: #ffffff;
        border-radius: .10rem 0 0 .10rem;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: .34rem;
	color: #ff5550;
    }
    .up-wrap .mock-inputer .cptt{
        flex:auto;
        line-height: .78rem;
        display: flex;
        justify-content: center;
        box-sizing: border-box;
        align-items: center;
        height: .78rem;
        background-color: #ff5550;
        border-radius: 0px .10rem .10rem 0px;
        border: solid .01rem #ffffff;
        font-size: .34rem;
	color: #ffffff;
    }
    .up-wrap .tac{
        font-size: .24rem;
        text-align: center;
	color: #ffffff;
    }
</style>
<!-- 安全提醒 -->
<section class="fixed-top">
    <div class="fixed-top-tip">本网页已通过安全检测，请放心浏览</div>
</section>
<!-- 关闭提醒 -->
<if condition="($Think.cookie.channel eq qudao191) or ($Think.cookie.channel eq qudao194) or ($channel eq qudao91)">
    <else />
    <div class="close_container">

        <!--<div class="close-wrap for-bbqm">-->
            <!--<div class="up-wrap">-->
                <!--<img src="__PUBLIC__/images/bbqm_img/v4/img_guanbi.png" alt="" class="close_BB">-->
                <!--<div class="dashi-wrap">-->
                    <!--<img src="__PUBLIC__/images/bbqm_img/v4/img_touxiang.png" alt="" class="avatar">-->
                    <!--<div class="wx-wraps">-->
                        <!--<div class="minge">每天只通过50个名额</div>-->
                        <!--<div class="wxcode">添加微信号：qumingxiaoxue立即咨询</div>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="mock-inputer">-->
                    <!--<div class="white">qumingxiaoxue</div>-->
                    <!--<div class="cptt share_qrcode">复制</div>-->
                <!--</div>-->
                <!--<div class="tac">加陈奕哲老师微信起好名字</div>-->
            <!--</div>-->
            <!--<img src="__PUBLIC__/images/bbqm_img/v4/img_dibu.png" alt="" class="bt-img" >-->
        <!--</div>-->


        < <div class="close_wrap">
            <div class="close_title">加微信，命理老师在线取好名</div>
            <div class="close_content">
                <div class="close_top">
                    <div class="top_head"><img src="__PUBLIC__/images/bzjp_img/CYZ_head.png" alt=""></div>
                    <div class="top_content">
                        <p>每天只通过50个名额，添加微信号GXQM_zz立即咨询</p>
                    </div>
                </div>
                <div class="close_search">
                    <div class="search_value" id="search_copy">GXQM_zz</div>
                    <div class="search_btn" data-clipboard-action="copy" data-clipboard-target="#search_copy">复制</div>
                </div>
                <a href="weixin://" data-clipboard-text="GXQM_zz">
                    <div class="open_wx">点击打开微信</div>
                </a>
                <p class="add_point">打开微信，点击右上角“<strong>+</strong>”，点击“<strong>添加朋友</strong>”</p>
                <img src="__PUBLIC__/images/bbqm_img/bd/weixin_tj.gif" width="80%" />
                <!--<img src="__PUBLIC__/images/public/weixin_demo.png" width="80%" alt="">-->
            </div>
            <div class="close_B"></div>
        </div>



        <!--<div class="close_wrap_pic">-->
            <!--<a href="#"><img class="share_qr" src="__PUBLIC__/images/public/share-qr.png" width="100%" alt=""></a>-->
         <!--<a href="#" ><img src="__PUBLIC__/images/public/share-qr.png"-->
                    <!--width="100%" alt="" class="search_btn" data-clipboard-action="copy" data-clipboard-target="#search_copy"></a>-->
                    <!--<a id="search_copy" href="weixin://" style='display: none;'>qumingxiaoxue</a>-->
         <!--<div class="close_B"></div>-->
         <!--</div>-->



    </div>

    <!-- <section class="sharePopup_container"> -->
    <!-- <div class="sharePopup_wrap"> -->
    <!-- <div class="close_sharePopup"></div> -->
    <!-- <div class="sharePopup_top"> -->
    <!-- <p>待提现余额</p> -->
    <!-- <h3> -->
    <!-- {$priceHB} <span>元</span></h3> -->
    <!-- </div> -->
    <!-- <div class="sharePopup_bottom"> -->
    <!-- <p>助力满10元，任意时间均可提现</p> -->
    <!-- </div> -->
    <!-- <div class="placeBtn"></div> -->
    <!-- </div> -->
    <!-- </section> -->

</if>
<!-- 提示分享 -->
<div class="ts_tc_container">
    <div class="ts_tc_bg">
        <div class="ts_tc_contnet">点击右上角分享到微信群和朋友圈。</div>
    </div>
</div>
<script type="text/javascript" src="__PUBLIC__/js/clipboard.min.js"></script>
<script>
    $('.close_B').on('click', function () {
        $('.close_container').hide();
        $('html,body').animate({
            scrollTop: $('.hot_cs')[0].offsetTop
        }, 500);
    })
    let iswx = "<!--{$Think.cookie.wxlogin}-->";
    let bzjp = "<!--{$orderidnum}-->";
    var channel = '<!--{$Think.cookie.channel}-->';
    var timerPo = null;
    var hidePopup = '<!--{$Think.cookie.hidePopupNum}-->';

    $(function () {
        $.getJSON("<!--{:U('Index/WXdownShare','',false)}-->", function (data) { //公众号不分享查询
            if (data == 1) {} else {
                console.log(channel)
                return
                if (channel == 'qudao191' ||
                    channel == 'qudao194' || channel == 'qudao227' || channel == 'zd1' || channel ==
                    'qudao245' || channel == 'qudao91' || channel == 'qudao258' || hidePopup == 1) {

                } else {
                    if (bzjp != "Bzjp") {
                        pushHistory();
                        if (iswx == 1) {}
                        pushHistory3();
                    } else {
                        pushHistory3();
                    }
                }
                window.addEventListener("popstate", function (e) { //首页
                    console.log(e.state)
                    if(!/MicroMessenger/i.test(navigator.userAgent)){
                        if (e.state == 'fuli') {
                            $.getJSON("<!--{:U('Index/jieguoyeReturn','',false)}-->", function (
                                data) { //回调统计入库
                            });
                            $('.close_container').fadeIn();
                        } else if (e.state == null && iswx == 1 && channel == 'qudao100') {
                            $('.sharePopup_container').fadeIn();
                        } else if (e.state == null && iswx != 1) {
                            window.history.back(-1)
                        }
                    }

                }, false);
            }
        });
        $('.bt-img').on('click', function () {
            console.log('toweixin')
            window.location.href = 'weixin://'
        })
        $('.close_B').on('click', function () {
            $('.close_container').css('display', 'none');
        })
        $('.close_BB').on('click', function () {
            $('.close_container').css('display', 'none');
        })

        // 安全提醒
        $('.fixed-top').fadeIn();
        let timerPo = setTimeout(function () {
            $('.fixed-top').fadeOut(1500);
            clearTimeout(timerPo)
        }, 2000)
    });

    function pushHistory() {
        window.history.pushState('fuli', null, document.URL)
    }

    function pushHistory3() {
        window.history.pushState('share', null, document.URL)
    }

    $('.close_sharePopup').on('click', function () {
        $('.sharePopup_container').fadeOut();
    })
    $('.placeBtn').on('click', function () {
        $('.ts_tc_container').fadeIn();
    })
    $('.ts_tc_container').on('click', function () {
        $(this).fadeOut();
    })


    $('.search_btn').on('click', function () { //复制操作
         var clipboard = new Clipboard('.search_btn');
         clipboard.on('success', function (e) {
             console.log(e);
         });

         layer.msg('复制成功', {
             icon: 1
         });
    });

    $('.share_qr').on('click', function (e) { //复制操作
        // if (/MicroMessenger/i.test(navigator.userAgent)) {
        //     e.stopPropagation();
        //     return
        // }

        var clipboard = new Clipboard('.share_qr', {
            text: function (trigger) {
                return 'qumingxiaoxue'
            }
        });
        clipboard.on('success', function (e) {
            console.log(e);
            setTimeout(function () {
                console.log('to weixin')
                let a = document.createElement('a')
                a.href = 'weixin://'
                a.click()
            }, 3000)

        });

        layer.msg('复制成功，即将前往微信', {
            icon: 1
        });
    });
    $('.share_qrcode').on('click', function (e) { //复制操作
        // if (/MicroMessenger/i.test(navigator.userAgent)) {
        //     e.stopPropagation();
        //     return
        // }

        var clipboard = new Clipboard('.share_qrcode', {
            text: function (trigger) {
                return 'qumingxiaoxue'
            }
        });
        clipboard.on('success', function (e) {
            console.log(e);
            setTimeout(function () {
                console.log('to weixin')
                let a = document.createElement('a')
                a.href = 'weixin://'
                a.click()
            }, 3000)

        });

        layer.msg('复制成功，即将前往微信', {
            icon: 1
        });
    });
</script>

<!-- 半价活动 -->
<style>
    .discount_container {
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 99;
        display: none;
    }

    .discount_bg {
        width: 100%;
        height: 100%;
        position: absolute;
        background-color: rgba(0, 0, 0, 0.7);
        top: 0;
        left: 0;
    }

    .discount_container.on {
        display: block;
    }

    .discount_container.on .discount_content {
        animation: onShow 0.3s ease-out forwards;
    }

    @keyframes onShow {
        0% {
            opacity: 0;
            transform: scale(0.3);
            -webkit-transform: scale(0.3);
        }

        100% {
            opacity: 1;
            transform: scale(1);
            -webkit-transform: scale(1);
        }
    }

    .discount_content {
        width: 100%;
        height: 5.69rem;
        padding: 3.5rem 1rem 0;
        box-sizing: border-box;
        background: url('__PUBLIC__/images/public/bjCoupon.png') 0% 0% / 100% 100% no-repeat;
        position: absolute;
        top: 20%;
        text-align: center;
    }

    .discount_btn {
        width: 4.4rem;
        height: 0.86rem;
        background: url('__PUBLIC__/images/public/bjCoupon_btn.png') 0% 0% / 100% 100% no-repeat;
        ;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .discount_txt {
        font-size: 0.2rem;
        color: #ffffff;
        text-align: center;
        margin-top: 0.3rem;
    }

    .discount_close {
        width: 0.64rem;
        height: 0.64rem;
        background: url('__PUBLIC__/images/public/close_.png') 0% 0% / 100% 100% no-repeat;
        position: absolute;
        top: -0.64rem;
        right: 0.8rem;
    }
</style>
<div class="discount_container">
    <div class="discount_bg"></div>
    <div class="discount_content">
        <div class="discount_btn"></div>
        <p class="discount_txt">优惠券可在解锁测算结果时使用<br />（每位新用户均可享受一次半价优惠！）</p>
        <div class="discount_close"></div>
    </div>
</div>
<script>
    var server = "<!--{$Think.cookie.orderidnum}-->"; // H5单页
    const isflag = "<!--{$Think.cookie.discountQczhChannel}-->" // 是否新用户
    const isHave = "<!--{$Think.cookie.discountQczh}-->" //是否领取
    const fliterQudao = ["Bzcy", "Bzhh", "Xzcs", "Lnyc2019", "Lath", "Bbqm", "Xmcs", "Bzjp"]

    //    console.log(server);
    //    console.log(isflag);
    //    console.log(isHave);
    $(function () {
        if (parseInt(isflag) === 1) {
            if (parseInt(isHave) == 1 && fliterQudao.some(function (item) {
                    return item == server
                })) {
                let timer = null

                timer = setTimeout(function () {
                    $('.discount_container').addClass('on');
                    clearTimeout(timer)
                }, 500)
            }
        }

        $('.discount_close').on('click', function () {
            $('.discount_container').removeClass('on');
        })
        $('.discount_btn').on('click', function () {
            $.getJSON("<!--{:U('Index/discountQczh','',false)}-->", function (data) {
                console.log(data)
            })
            $('.discount_container').removeClass('on');
        })
    })
</script>